# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

# Ice version 3.3.1
# Generated from file `MRPLPeer.ice'

import Ice, IcePy, __builtin__

if not Ice.__dict__.has_key("_struct_marker"):
    Ice._struct_marker = object()
#import IceE_Identity_ice
import Session_ice

# Included module Ice
_M_Ice = Ice.openModule('Ice')

# Included module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')

# Start of module peer
_M_peer = Ice.openModule('peer')
__name__ = 'peer'

if not _M_peer.__dict__.has_key('PeerAccessLevel'):
    _M_peer.PeerAccessLevel = Ice.createTempClass()
    class PeerAccessLevel(object):

        def __init__(self, val):
            assert(val >= 0 and val < 9)
            self.value = val

        def __str__(self):
            if self.value == 0:
                return 'AccessLevelOwner'
            elif self.value == 1:
                return 'AccessLevelOwnerRestricted'
            elif self.value == 2:
                return 'AccessLevelNormalEnhanced'
            elif self.value == 3:
                return 'AccessLevelNormal'
            elif self.value == 4:
                return 'AccessLevelNormalRestricted'
            elif self.value == 5:
                return 'AccessLevelGuestEnhanced'
            elif self.value == 6:
                return 'AccessLevelGuest'
            elif self.value == 7:
                return 'AccessLevelGuestRestricted'
            elif self.value == 8:
                return 'AccessLevelNone'
            return None

        __repr__ = __str__

        def __hash__(self):
            return self.value

        def __cmp__(self, other):
            return cmp(self.value, other.value)

    PeerAccessLevel.AccessLevelOwner = PeerAccessLevel(0)
    PeerAccessLevel.AccessLevelOwnerRestricted = PeerAccessLevel(1)
    PeerAccessLevel.AccessLevelNormalEnhanced = PeerAccessLevel(2)
    PeerAccessLevel.AccessLevelNormal = PeerAccessLevel(3)
    PeerAccessLevel.AccessLevelNormalRestricted = PeerAccessLevel(4)
    PeerAccessLevel.AccessLevelGuestEnhanced = PeerAccessLevel(5)
    PeerAccessLevel.AccessLevelGuest = PeerAccessLevel(6)
    PeerAccessLevel.AccessLevelGuestRestricted = PeerAccessLevel(7)
    PeerAccessLevel.AccessLevelNone = PeerAccessLevel(8)

    _M_peer._t_PeerAccessLevel = IcePy.defineEnum('::peer::PeerAccessLevel', PeerAccessLevel, (), (PeerAccessLevel.AccessLevelOwner, PeerAccessLevel.AccessLevelOwnerRestricted, PeerAccessLevel.AccessLevelNormalEnhanced, PeerAccessLevel.AccessLevelNormal, PeerAccessLevel.AccessLevelNormalRestricted, PeerAccessLevel.AccessLevelGuestEnhanced, PeerAccessLevel.AccessLevelGuest, PeerAccessLevel.AccessLevelGuestRestricted, PeerAccessLevel.AccessLevelNone))

    _M_peer.PeerAccessLevel = PeerAccessLevel
    del PeerAccessLevel

if not _M_peer.__dict__.has_key('_t_IdentityArray'):
    _M_peer._t_IdentityArray = IcePy.defineSequence('::peer::IdentityArray', (), _M_Ice._t_Identity)

if not _M_peer.__dict__.has_key('_t_ObjectProxyArray'):
    _M_peer._t_ObjectProxyArray = IcePy.defineSequence('::peer::ObjectProxyArray', (), IcePy._t_ObjectPrx)

if not _M_peer.__dict__.has_key('_t_IdentityToProxyMap'):
    _M_peer._t_IdentityToProxyMap = IcePy.defineDictionary('::peer::IdentityToProxyMap', (), _M_Ice._t_Identity, IcePy._t_ObjectPrx)

if not _M_peer.__dict__.has_key('PeerIdentifier'):
    _M_peer.PeerIdentifier = Ice.createTempClass()
    class PeerIdentifier(object):
        def __init__(self, userId='', firstName='', lastName=''):
            self.userId = userId
            self.firstName = firstName
            self.lastName = lastName

        def __hash__(self):
            _h = 0
            _h = 5 * _h + __builtin__.hash(self.userId)
            _h = 5 * _h + __builtin__.hash(self.firstName)
            _h = 5 * _h + __builtin__.hash(self.lastName)
            return _h % 0x7fffffff

        def __cmp__(self, other):
            if other == None:
                return 1
            if self.userId < other.userId:
                return -1
            elif self.userId > other.userId:
                return 1
            if self.firstName < other.firstName:
                return -1
            elif self.firstName > other.firstName:
                return 1
            if self.lastName < other.lastName:
                return -1
            elif self.lastName > other.lastName:
                return 1
            return 0

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_PeerIdentifier)

        __repr__ = __str__

    _M_peer._t_PeerIdentifier = IcePy.defineStruct('::peer::PeerIdentifier', PeerIdentifier, (), (
        ('userId', (), IcePy._t_string),
        ('firstName', (), IcePy._t_string),
        ('lastName', (), IcePy._t_string)
    ))

    _M_peer.PeerIdentifier = PeerIdentifier
    del PeerIdentifier

if not _M_peer.__dict__.has_key('PeerException'):
    _M_peer.PeerException = Ice.createTempClass()
    class PeerException(Ice.UserException):
        def __init__(self, reason=''):
            self.reason = reason

        def ice_name(self):
            return 'peer::PeerException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_PeerException = IcePy.defineException('::peer::PeerException', PeerException, (), None, (('reason', (), IcePy._t_string),))
    PeerException.ice_type = _M_peer._t_PeerException

    _M_peer.PeerException = PeerException
    del PeerException

if not _M_peer.__dict__.has_key('InvalidIdentityException'):
    _M_peer.InvalidIdentityException = Ice.createTempClass()
    class InvalidIdentityException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::InvalidIdentityException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_InvalidIdentityException = IcePy.defineException('::peer::InvalidIdentityException', InvalidIdentityException, (), _M_peer._t_PeerException, ())
    InvalidIdentityException.ice_type = _M_peer._t_InvalidIdentityException

    _M_peer.InvalidIdentityException = InvalidIdentityException
    del InvalidIdentityException

if not _M_peer.__dict__.has_key('PeerAccessException'):
    _M_peer.PeerAccessException = Ice.createTempClass()
    class PeerAccessException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::PeerAccessException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_PeerAccessException = IcePy.defineException('::peer::PeerAccessException', PeerAccessException, (), _M_peer._t_PeerException, ())
    PeerAccessException.ice_type = _M_peer._t_PeerAccessException

    _M_peer.PeerAccessException = PeerAccessException
    del PeerAccessException

if not _M_peer.__dict__.has_key('PeerUnavailableException'):
    _M_peer.PeerUnavailableException = Ice.createTempClass()
    class PeerUnavailableException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::PeerUnavailableException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_PeerUnavailableException = IcePy.defineException('::peer::PeerUnavailableException', PeerUnavailableException, (), _M_peer._t_PeerException, ())
    PeerUnavailableException.ice_type = _M_peer._t_PeerUnavailableException

    _M_peer.PeerUnavailableException = PeerUnavailableException
    del PeerUnavailableException

if not _M_peer.__dict__.has_key('PeerConnectionFailedException'):
    _M_peer.PeerConnectionFailedException = Ice.createTempClass()
    class PeerConnectionFailedException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::PeerConnectionFailedException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_PeerConnectionFailedException = IcePy.defineException('::peer::PeerConnectionFailedException', PeerConnectionFailedException, (), _M_peer._t_PeerException, ())
    PeerConnectionFailedException.ice_type = _M_peer._t_PeerConnectionFailedException

    _M_peer.PeerConnectionFailedException = PeerConnectionFailedException
    del PeerConnectionFailedException

if not _M_peer.__dict__.has_key('DuplicateConnectionException'):
    _M_peer.DuplicateConnectionException = Ice.createTempClass()
    class DuplicateConnectionException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::DuplicateConnectionException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_DuplicateConnectionException = IcePy.defineException('::peer::DuplicateConnectionException', DuplicateConnectionException, (), _M_peer._t_PeerException, ())
    DuplicateConnectionException.ice_type = _M_peer._t_DuplicateConnectionException

    _M_peer.DuplicateConnectionException = DuplicateConnectionException
    del DuplicateConnectionException

if not _M_peer.__dict__.has_key('RegistrationException'):
    _M_peer.RegistrationException = Ice.createTempClass()
    class RegistrationException(_M_peer.PeerException):
        def __init__(self, reason=''):
            _M_peer.PeerException.__init__(self, reason)

        def ice_name(self):
            return 'peer::RegistrationException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_peer._t_RegistrationException = IcePy.defineException('::peer::RegistrationException', RegistrationException, (), _M_peer._t_PeerException, ())
    RegistrationException.ice_type = _M_peer._t_RegistrationException

    _M_peer.RegistrationException = RegistrationException
    del RegistrationException

if not _M_peer.__dict__.has_key('UserConnectionEventHandler'):
    _M_peer.UserConnectionEventHandler = Ice.createTempClass()
    class UserConnectionEventHandler(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_peer.UserConnectionEventHandler:
                raise RuntimeError('peer.UserConnectionEventHandler is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::peer::UserConnectionEventHandler')

        def ice_id(self, current=None):
            return '::peer::UserConnectionEventHandler'

        def ice_staticId():
            return '::peer::UserConnectionEventHandler'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def forcedLogoutNotification(self, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_UserConnectionEventHandler)

        __repr__ = __str__

    _M_peer.UserConnectionEventHandlerPrx = Ice.createTempClass()
    class UserConnectionEventHandlerPrx(Ice.ObjectPrx):

        def forcedLogoutNotification(self, _ctx=None):
            return _M_peer.UserConnectionEventHandler._op_forcedLogoutNotification.invoke(self, ((), _ctx))

        def forcedLogoutNotification_async(self, _cb, _ctx=None):
            return _M_peer.UserConnectionEventHandler._op_forcedLogoutNotification.invokeAsync(self, (_cb, (), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_peer.UserConnectionEventHandlerPrx.ice_checkedCast(proxy, '::peer::UserConnectionEventHandler', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_peer.UserConnectionEventHandlerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_peer._t_UserConnectionEventHandlerPrx = IcePy.defineProxy('::peer::UserConnectionEventHandler', UserConnectionEventHandlerPrx)

    _M_peer._t_UserConnectionEventHandler = IcePy.defineClass('::peer::UserConnectionEventHandler', UserConnectionEventHandler, (), True, None, (), ())
    UserConnectionEventHandler.ice_type = _M_peer._t_UserConnectionEventHandler

    UserConnectionEventHandler._op_forcedLogoutNotification = IcePy.Operation('forcedLogoutNotification', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), None, ())

    _M_peer.UserConnectionEventHandler = UserConnectionEventHandler
    del UserConnectionEventHandler

    _M_peer.UserConnectionEventHandlerPrx = UserConnectionEventHandlerPrx
    del UserConnectionEventHandlerPrx

if not _M_peer.__dict__.has_key('PeerConnectionEventHandler'):
    _M_peer.PeerConnectionEventHandler = Ice.createTempClass()
    class PeerConnectionEventHandler(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_peer.PeerConnectionEventHandler:
                raise RuntimeError('peer.PeerConnectionEventHandler is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::peer::PeerConnectionEventHandler')

        def ice_id(self, current=None):
            return '::peer::PeerConnectionEventHandler'

        def ice_staticId():
            return '::peer::PeerConnectionEventHandler'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def peerConnected(self, peerUserId, accessLevel, peerProxy, current=None):
        # def peerConnectedNoProxy(self, peerUserId, accessLevel, current=None):
        # def peerDisconnected(self, peerUserId, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_PeerConnectionEventHandler)

        __repr__ = __str__

    _M_peer.PeerConnectionEventHandlerPrx = Ice.createTempClass()
    class PeerConnectionEventHandlerPrx(Ice.ObjectPrx):

        def peerConnected(self, peerUserId, accessLevel, peerProxy, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerConnected.invoke(self, ((peerUserId, accessLevel, peerProxy), _ctx))

        def peerConnected_async(self, _cb, peerUserId, accessLevel, peerProxy, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerConnected.invokeAsync(self, (_cb, (peerUserId, accessLevel, peerProxy), _ctx))

        def peerConnectedNoProxy(self, peerUserId, accessLevel, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerConnectedNoProxy.invoke(self, ((peerUserId, accessLevel), _ctx))

        def peerConnectedNoProxy_async(self, _cb, peerUserId, accessLevel, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerConnectedNoProxy.invokeAsync(self, (_cb, (peerUserId, accessLevel), _ctx))

        def peerDisconnected(self, peerUserId, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerDisconnected.invoke(self, ((peerUserId, ), _ctx))

        def peerDisconnected_async(self, _cb, peerUserId, _ctx=None):
            return _M_peer.PeerConnectionEventHandler._op_peerDisconnected.invokeAsync(self, (_cb, (peerUserId, ), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_peer.PeerConnectionEventHandlerPrx.ice_checkedCast(proxy, '::peer::PeerConnectionEventHandler', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_peer.PeerConnectionEventHandlerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_peer._t_PeerConnectionEventHandlerPrx = IcePy.defineProxy('::peer::PeerConnectionEventHandler', PeerConnectionEventHandlerPrx)

    _M_peer._t_PeerConnectionEventHandler = IcePy.defineClass('::peer::PeerConnectionEventHandler', PeerConnectionEventHandler, (), True, None, (), ())
    PeerConnectionEventHandler.ice_type = _M_peer._t_PeerConnectionEventHandler

    PeerConnectionEventHandler._op_peerConnected = IcePy.Operation('peerConnected', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string), ((), _M_peer._t_PeerAccessLevel), ((), IcePy._t_ObjectPrx)), (), None, ())
    PeerConnectionEventHandler._op_peerConnectedNoProxy = IcePy.Operation('peerConnectedNoProxy', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string), ((), _M_peer._t_PeerAccessLevel)), (), None, ())
    PeerConnectionEventHandler._op_peerDisconnected = IcePy.Operation('peerDisconnected', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), None, ())

    _M_peer.PeerConnectionEventHandler = PeerConnectionEventHandler
    del PeerConnectionEventHandler

    _M_peer.PeerConnectionEventHandlerPrx = PeerConnectionEventHandlerPrx
    del PeerConnectionEventHandlerPrx

if not _M_peer.__dict__.has_key('ConnectionEventHandler'):
    _M_peer.ConnectionEventHandler = Ice.createTempClass()
    class ConnectionEventHandler(_M_peer.UserConnectionEventHandler, _M_peer.PeerConnectionEventHandler):
        def __init__(self):
            if __builtin__.type(self) == _M_peer.ConnectionEventHandler:
                raise RuntimeError('peer.ConnectionEventHandler is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::peer::ConnectionEventHandler', '::peer::PeerConnectionEventHandler', '::peer::UserConnectionEventHandler')

        def ice_id(self, current=None):
            return '::peer::ConnectionEventHandler'

        def ice_staticId():
            return '::peer::ConnectionEventHandler'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_ConnectionEventHandler)

        __repr__ = __str__

    _M_peer.ConnectionEventHandlerPrx = Ice.createTempClass()
    class ConnectionEventHandlerPrx(_M_peer.UserConnectionEventHandlerPrx, _M_peer.PeerConnectionEventHandlerPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_peer.ConnectionEventHandlerPrx.ice_checkedCast(proxy, '::peer::ConnectionEventHandler', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_peer.ConnectionEventHandlerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_peer._t_ConnectionEventHandlerPrx = IcePy.defineProxy('::peer::ConnectionEventHandler', ConnectionEventHandlerPrx)

    _M_peer._t_ConnectionEventHandler = IcePy.defineClass('::peer::ConnectionEventHandler', ConnectionEventHandler, (), True, None, (_M_peer._t_UserConnectionEventHandler, _M_peer._t_PeerConnectionEventHandler), ())
    ConnectionEventHandler.ice_type = _M_peer._t_ConnectionEventHandler

    _M_peer.ConnectionEventHandler = ConnectionEventHandler
    del ConnectionEventHandler

    _M_peer.ConnectionEventHandlerPrx = ConnectionEventHandlerPrx
    del ConnectionEventHandlerPrx

if not _M_peer.__dict__.has_key('PeerRegistrationHandler'):
    _M_peer.PeerRegistrationHandler = Ice.createTempClass()
    class PeerRegistrationHandler(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_peer.PeerRegistrationHandler:
                raise RuntimeError('peer.PeerRegistrationHandler is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::peer::PeerRegistrationHandler')

        def ice_id(self, current=None):
            return '::peer::PeerRegistrationHandler'

        def ice_staticId():
            return '::peer::PeerRegistrationHandler'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def registerCallbacks(self, selfCallbackProxy, connectionEventHandlerProxy, current=None):
        # def registerProxy(self, proxy, current=None):
        # def registerProxies(self, proxies, current=None):
        # def getPeerProxy(self, peerUserId, privateProxyIdentity, current=None):
        # def getPeerProxies(self, peerUserId, privateProxyIdentities, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_PeerRegistrationHandler)

        __repr__ = __str__

    _M_peer.PeerRegistrationHandlerPrx = Ice.createTempClass()
    class PeerRegistrationHandlerPrx(Ice.ObjectPrx):

        def registerCallbacks(self, selfCallbackProxy, connectionEventHandlerProxy, _ctx=None):
            return _M_peer.PeerRegistrationHandler._op_registerCallbacks.invoke(self, ((selfCallbackProxy, connectionEventHandlerProxy), _ctx))

        def registerProxy(self, proxy, _ctx=None):
            return _M_peer.PeerRegistrationHandler._op_registerProxy.invoke(self, ((proxy, ), _ctx))

        def registerProxies(self, proxies, _ctx=None):
            return _M_peer.PeerRegistrationHandler._op_registerProxies.invoke(self, ((proxies, ), _ctx))

        def getPeerProxy(self, peerUserId, privateProxyIdentity, _ctx=None):
            return _M_peer.PeerRegistrationHandler._op_getPeerProxy.invoke(self, ((peerUserId, privateProxyIdentity), _ctx))

        def getPeerProxies(self, peerUserId, privateProxyIdentities, _ctx=None):
            return _M_peer.PeerRegistrationHandler._op_getPeerProxies.invoke(self, ((peerUserId, privateProxyIdentities), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_peer.PeerRegistrationHandlerPrx.ice_checkedCast(proxy, '::peer::PeerRegistrationHandler', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_peer.PeerRegistrationHandlerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_peer._t_PeerRegistrationHandlerPrx = IcePy.defineProxy('::peer::PeerRegistrationHandler', PeerRegistrationHandlerPrx)

    _M_peer._t_PeerRegistrationHandler = IcePy.defineClass('::peer::PeerRegistrationHandler', PeerRegistrationHandler, (), True, None, (), ())
    PeerRegistrationHandler.ice_type = _M_peer._t_PeerRegistrationHandler

    PeerRegistrationHandler._op_registerCallbacks = IcePy.Operation('registerCallbacks', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_ObjectPrx), ((), _M_peer._t_ConnectionEventHandlerPrx)), (), None, (_M_peer._t_RegistrationException,))
    PeerRegistrationHandler._op_registerProxy = IcePy.Operation('registerProxy', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_ObjectPrx),), (), None, (_M_peer._t_RegistrationException,))
    PeerRegistrationHandler._op_registerProxies = IcePy.Operation('registerProxies', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), _M_peer._t_ObjectProxyArray),), (), None, (_M_peer._t_RegistrationException,))
    PeerRegistrationHandler._op_getPeerProxy = IcePy.Operation('getPeerProxy', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string), ((), _M_Ice._t_Identity)), (), IcePy._t_ObjectPrx, (_M_peer._t_PeerAccessException, _M_peer._t_InvalidIdentityException))
    PeerRegistrationHandler._op_getPeerProxies = IcePy.Operation('getPeerProxies', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string), ((), _M_peer._t_IdentityArray)), (), _M_peer._t_IdentityToProxyMap, (_M_peer._t_PeerAccessException, _M_peer._t_InvalidIdentityException))

    _M_peer.PeerRegistrationHandler = PeerRegistrationHandler
    del PeerRegistrationHandler

    _M_peer.PeerRegistrationHandlerPrx = PeerRegistrationHandlerPrx
    del PeerRegistrationHandlerPrx

if not _M_peer.__dict__.has_key('_t_PeerIdentifierSet'):
    _M_peer._t_PeerIdentifierSet = IcePy.defineSequence('::peer::PeerIdentifierSet', (), _M_peer._t_PeerIdentifier)

if not _M_peer.__dict__.has_key('UserSession'):
    _M_peer.UserSession = Ice.createTempClass()
    class UserSession(_M_Glacier2.Session, _M_peer.PeerRegistrationHandler):
        def __init__(self):
            if __builtin__.type(self) == _M_peer.UserSession:
                raise RuntimeError('peer.UserSession is an abstract class')

        def ice_ids(self, current=None):
            return ('::Glacier2::Session', '::Ice::Object', '::peer::PeerRegistrationHandler', '::peer::UserSession')

        def ice_id(self, current=None):
            return '::peer::UserSession'

        def ice_staticId():
            return '::peer::UserSession'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def getMyAvailablePeers(self, current=None):
        # def connectToPeer(self, peerUserId, current=None):
        # def getConnectedPeers(self, current=None):
        # def disconnectFromPeer(self, peerUserId, current=None):
        # def disconnectFromPeers(self, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_peer._t_UserSession)

        __repr__ = __str__

    _M_peer.UserSessionPrx = Ice.createTempClass()
    class UserSessionPrx(_M_Glacier2.SessionPrx, _M_peer.PeerRegistrationHandlerPrx):

        def getMyAvailablePeers(self, _ctx=None):
            return _M_peer.UserSession._op_getMyAvailablePeers.invoke(self, ((), _ctx))

        def connectToPeer(self, peerUserId, _ctx=None):
            return _M_peer.UserSession._op_connectToPeer.invoke(self, ((peerUserId, ), _ctx))

        def getConnectedPeers(self, _ctx=None):
            return _M_peer.UserSession._op_getConnectedPeers.invoke(self, ((), _ctx))

        def disconnectFromPeer(self, peerUserId, _ctx=None):
            return _M_peer.UserSession._op_disconnectFromPeer.invoke(self, ((peerUserId, ), _ctx))

        def disconnectFromPeers(self, _ctx=None):
            return _M_peer.UserSession._op_disconnectFromPeers.invoke(self, ((), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_peer.UserSessionPrx.ice_checkedCast(proxy, '::peer::UserSession', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_peer.UserSessionPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_peer._t_UserSessionPrx = IcePy.defineProxy('::peer::UserSession', UserSessionPrx)

    _M_peer._t_UserSession = IcePy.defineClass('::peer::UserSession', UserSession, (), True, None, (_M_Glacier2._t_Session, _M_peer._t_PeerRegistrationHandler), ())
    UserSession.ice_type = _M_peer._t_UserSession

    UserSession._op_getMyAvailablePeers = IcePy.Operation('getMyAvailablePeers', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), _M_peer._t_PeerIdentifierSet, (_M_peer._t_PeerException,))
    UserSession._op_connectToPeer = IcePy.Operation('connectToPeer', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), IcePy._t_ObjectPrx, (_M_peer._t_PeerAccessException, _M_peer._t_PeerUnavailableException, _M_peer._t_PeerConnectionFailedException, _M_peer._t_DuplicateConnectionException))
    UserSession._op_getConnectedPeers = IcePy.Operation('getConnectedPeers', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), _M_peer._t_PeerIdentifierSet, (_M_peer._t_PeerException,))
    UserSession._op_disconnectFromPeer = IcePy.Operation('disconnectFromPeer', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), None, ())
    UserSession._op_disconnectFromPeers = IcePy.Operation('disconnectFromPeers', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), None, ())

    _M_peer.UserSession = UserSession
    del UserSession

    _M_peer.UserSessionPrx = UserSessionPrx
    del UserSessionPrx

# End of module peer
